
// Define output pin names
#define TEMP_CONTROL_HEAT 7
#define TEMP_CONTROL_COOL 8 
#define LIGHT_LED_FRIDGE 3
#define AIR_FAN_FRIDGE 5

#define SOFTWARESERIAL_LCD_OUTPUT 2

// Define input pin names
#define LIGHT_SWITCH_DOOR 12

//Define analog input pin names
#define TEMP_INPUT_FRIDGE 0
#define WEIGHT_SENSOR_KEG1 1

boolean DEBUG = true;

//Timer Values
int compressorONtimer = 0;
int compressorOFFtimer = 0;

long minCompressorONtime = 3000;
long minCompressorOFFtime = 5000;

long millisCompressorOFF = millis();
long millisCompressorON = millis();

boolean requestCompOn = false;
// when true the compressor will not turn on due to unknown state on last power down
boolean compressorSaftetyOverride = true;  

long loopTimer = millis();

// Setup gobal variables
boolean  adkConnected = false;
boolean  compressorON = false;
int EEpromCompressorState = 255;
boolean  lightON = false;
long     prevMillis_LCDupdate = millis();
long     prevMillis_Temp = 0;
long     LCDrefreshRate = 250;
long     SampleRefreshMillisecond = 500;
int      LCDdelay = 10;
int      A2D_SAMPLES = 100;

long prevMillis_LightUpdate = millis();
long lightRefreshRate = 10;


// Gobal temps
long fridgeTemp1 = 2200;
long fridgeSetTemp1 = 2200;

int tempHysteresis = 100;

int pwmRate = 0;
int fanSpeed = 0;
boolean countUp = true;
